Bug #619080.
authorLi Yuan <li.yuan@sun.com>
Thu, 27 May 2010 06:57:38 +0000 (14:57 +0800)
committerLi Yuan <li.yuan@sun.com>
Thu, 27 May 2010 06:57:38 +0000 (14:57 +0800)
Do not emit the text-changed::insert signal when the entry is empty.

modules/other/gail/gailentry.c

index cfe724b1b3f723f17c4eac102f6bcff60e69992a..33009eac99a30b316e9d295900af543e5847a2f5 100644 (file)
@@ -1020,6 +1020,12 @@ gail_entry_idle_notify_insert (gpointer data)
 static void
 gail_entry_notify_insert (GailEntry *entry)
 {
+  GtkWidget *widget;
+
+  widget = GTK_ACCESSIBLE (entry)->widget;
+  if (gtk_entry_get_text_length (GTK_ENTRY (widget)) == 0)
+    return;
+
   if (entry->signal_name_insert)
     {
       g_signal_emit_by_name (entry, 
@@ -1043,6 +1049,9 @@ _gail_entry_insert_text_cb (GtkEntry *entry,
   GailEntry *gail_entry;
   gint *position = (gint *) arg3;
 
+  if (arg2 == 0)
+    return;
+
   accessible = gtk_widget_get_accessible (GTK_WIDGET (entry));
   gail_entry = GAIL_ENTRY (accessible);
   if (!gail_entry->signal_name_insert)